import { request } from '@/plugins/request'

// 发布文章
export const createArticle = data => {
    return request({
      method: 'POST',
      url: '/api/articles',
      data
    })
}

// 更新文章
export const updateArticle = (slug, data) => {
    return request({
        method: 'PUT',
        url: `/api/articles/${slug}`,
        data
    })
}
